The Design of Robot Teleoperation Network Communication Platform

At present, robot remote operating system has become a hot spot in robot research. In the process of robot teleoperation, the network communication between the local server and the remote client is the key link of teleoperation. Aiming at the communication problem of robot remote operation, this paper designs a network communication platform based on TCP / IP protocol realized by Socket under Windows XP environment.

1 Socket programming principle

1.1 Introduction to Socket

Socket was originally a network communication interface developed for the UNIX operating system by the University of California, Berkeley. Later, Intel, Microsoft, Sun and other network vendors ported it to Windows to form the Windows Sockets specification, which defined a set of network programming interfaces under the Windows environment. The hierarchical structure of the network communication program developed using Windows Socket is shown in Figure 1.

Sockets programming structure

Figure 1 Sockets programming structure

According to the different types of transmitted data, Sockets can be divided into two types: streaming sockets (SOCK_STREAM) and datagram sockets (SOCK_DGRAM). Streaming sockets provide connection-oriented and reliable data transmission services. The data is sent without errors and without duplication, and is accepted in the order of sending. Streaming sockets are actually implemented based on the TCP protocol. Datagram sockets provide connectionless services. The datagrams are sent in independent packages, without error-free guarantee, the data may be lost or duplicated, and the acceptance order is chaotic. The datagram socket is actually implemented based on the UDP protocol.

According to the function of socket in Client / Server mode, it can be divided into two categories:

Listening socket: The socket is located on the server side. Its main function is to continuously monitor specific ports. When a connection request is detected, it accepts the application and constructs a new client socket. The client socket of the connection applicant establishes a connection to prepare for communication between the two parties.

Client socket: This socket is an entity used for network communication. It is located on the client and the server. The server must maintain the same number of such sockets as the clients it serves to form a server-centric star structure.

1.2 Design steps of TCP network communication platform

Internet-based robot teleoperation technology is a combination of modern network technology and robot control technology. The Internet uses the Internet packet switching protocol TCP / IP as the communication specification, which includes TCP, UDP, and ICMP. Among them, the TCP protocol is a connection-oriented protocol, which requires that a connection must be established with the communication party before data exchange. It has the function of segmentation and reassembly, which can ensure reliable and orderly transmission of data.

The entire process of TCP communication can be divided into three phases: connection establishment, data transmission, and disconnection.

(1) Connection establishment phase: First, the listening socket in the server listens to the break, and the client's socket requests a connection to the server's specific break.

(2) Communication stage: This is the core part of the whole process, and the task is to be responsible for the sending and receiving of data.

(3) Dismantling the connection stage: After transmitting the data, close the socket and release the allocated resources.

The main steps for writing TCP communication programs using Soeket are as follows:

1) Construct Soeket objects;

2) Use this object to construct a basic Socket handle. Because the data communication requirements for remote operation are reliable and accurate, the TCP protocol is used, and the socket uses a stream socket;

3) Establish a client CSocket, call Connect () to establish a connection with the server socket. The server calls Listen () to monitor the connection status of the request, and calls Accept () to receive the client connection after receiving the client request.

4) Construct a CSocketFile object and use the CSocket object to associate with it.

5) Construct a CArchive object for receiving and sending data. Use CArchive object for socket communication between client and server

6) After the communication is over, close the socket and exit the program.

2 Implementation of TCP network communication platform program

This program is a network communication platform built for robot teleoperation communication. The platform implements data network communication between a local server and a remote client. The system structure is shown in Figure 2.

Remote operating system structure diagram

Figure 2 Remote operating system structure diagram

The programming in this article is based on the TCP / IP protocol and uses the client / server model. The network environment designed and debugged by this program is a LAN configured with TCP / IP protocol in Windows XP. The IP address of the server is "192.168.0.104", and the communication port can be set arbitrarily.

Clamp Sensor

Feyvan Electronics designs and manufactures NTC temperature sensors, probes, and cable assemblies with excellent long-term stability, high accuracy and short response time in high-temperature sensing applications such as automotive, home appliance and industrial use from -40℃ to +250℃

With more than 15 years of NTC thermistors and sensor probes production experiences, Feyvan electronics provide various choices for a wide range of applications and are available in custom engineered probe package configurations for a variety of mounting and connectivity options with low costs.

Clamp Sensor

Clamp Sensor,Hot-Water Line Sensor,Sensor Condensate Sensor,Current Clamp Sensor

Feyvan Electronics Technology Co., Ltd. , http://www.fv-cable-assembly.com